# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=kops
pkgver=1.17.1
pkgrel=0
pkgdesc="Kubernetes Operations"
url="https://github.com/kubernetes/kops"
arch="x86_64"
license="Apache-2.0"
depends="kubernetes"
makedepends="go"
options="chmod-clean"
source="$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"

export GOPATH=$srcdir/go

prepare() {
	default_prepare

	local dir=$GOPATH/src/k8s.io
	mkdir -p "$dir"
	ln -s "$builddir" "$dir/$pkgname"
}

build() {
	make
}

check() {
	make test
}

package() {
	install -D "$GOPATH"/bin/kops "$pkgdir"/usr/bin/kops
}

sha512sums="ddad1f70ac8573d4bea3182103f605874f5d50f0fc2d5246a8da49da985dcaece8e4740a23e14066a95292e72450d8d0876a80ab84a9d16e10bc2b92d16ee9d6  kops-1.17.1.tar.gz"
